import * as VueRouter from 'vue-router'
import Login from '../components/Login'
import Index from '../components/index/Index'
import Register from '../components/Register'

const routes = [
        {
            path: '/',
            redirect: '/index'
        },
        {
            name: "login",
            path: '/login',
            component: Login,
            meta: {
                auth : false,
                title: "红皮书登录"
            }
        },
        {
            name: "index",
            path: '/index',
            component: Index,
            meta: {
                auth : false,
                title: "红皮书主页"
            }
        },
        {
            name: "register",
            path: '/register',
            component: Register,
            meta: {
                auth : false,
                title: "注册页面"
            }
        }
    ]

    const router = VueRouter.createRouter({
        history: VueRouter.createWebHistory(),
        routes,
      });

export default router